<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
	<title>待制证</title>
	
	<link rel="stylesheet" href="${ctx}/static/css/reset.css"/>
	<link rel="stylesheet" href="${ctx}/static/css/common.css">
	<link rel="stylesheet" href="${ctx}/static/css/approvallist.css"/>

	<script type="text/javascript" src="${ctx}/static/lib/js/jquery.qrcode.min.js"></script>
	<script type="text/javascript" src="${ctx}/static/lib/js/jquery.printarea.js"></script>
	<script type="text/javascript" src="${ctx}/static/js/base.js"></script>
	<script type="text/javascript" src='${ctx}/static/js/applicationprocess.js'></script>

</head>
<body>
<div class="content">
	<div class="page-subcate-list">
		<div class="page-subcate-item">
			<label>证件号</label>
			<div class="form-item">
				<input type="text" class="form-control" id="cardNO" placeholder="" value="">
			</div>

			<label>订单号</label>
			<div class="form-item">
				<input type="text" class="form-control" id="num" placeholder="" value="">
				<div class="pull-right">
					<button class="pull-left btn">查询</button>
				</div>
			</div>
		</div>
	</div>
	<table class="print_orderlist_wrapper table table-bordered">
		<thead>
		<tr>
			<th>订单</th>
			<th>姓名</th>
			<th>取证日期</th>
			<th>订单类型</th>
			<th>申请方式</th>
			<th>操作</th>
		</tr>
		</thead>
		<tbody>
		<c:forEach items="${data.content}" var="item" varStatus="status">
			<tr id="${item.id}">
				<td>${item.num}</td>
				<td>${item.name}</td>
				<td>${item.appointmenDate}</td>
				<td>
					<c:if test="${item.applyType == 10}">首次</c:if>
					<c:if test="${item.applyType == 20}">换发</c:if>
					<c:if test="${item.applyType == 30}">补发</c:if>
				</td>
				<td>
					<c:if test="${item.applyForm == 1}">在线</c:if>
					<c:if test="${item.applyForm == 2}">现场</c:if>
				</td>
				<td align="center">
					<c:if test="${item.status==10}">
						<button class="print_accreditationbtn_item btn btn-primary btn-sm" type="button" itemId="${item.id}" itemName="${item.name}" itemPassportNo="${item.passportNO}" sex="${item.sex}" itemBirthday="${item.birthday}" itemSingAddress="${item.signAddress}" itemSignDate="${item.signDate}" itemSignUnti="${item.signUnti}" status="11">
							制证
						</button>
						<button class="print_reviewbtn_item btn btn-primary btn-sm" type="button" disabled>
							复核
						</button>
						<button class="print_pullbacktriggerbtn_item btn btn-primary btn-sm" id='${item.id}' type="button" disabled>
							撤回
						</button>
					</c:if>
					<c:if test="${item.status==11}">
						<button class="print_accreditationbtn_item btn btn-primary btn-sm" type="button" disabled>
							制证
						</button>
						<button class="print_reviewbtn_item btn btn-primary btn-sm" type="button" data-toggle="modal" myModalItemId="myModal_${item.id}" >
							复核
						</button>
						<button class="print_pullbacktriggerbtn_item btn btn-primary btn-sm" id='${item.id}' type="button" >
							撤回
						</button>
					</c:if>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<tags:pagination page="${data}" paginationSize="5"/>
</div>

<div class="print_statistics_wrapper modal fade" tabindex="-1" role="dialog" aria-labelledby="printFinsh" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
				<h4 class="modal-title"></h4>
			</div>
			<div class='modal-body'>
				<p class='text-center'>
					确定要打印吗？
				</p>
			</div>
			<input type="hidden" class="_ID" value="">
			<input type="hidden" class="_STATUS" value="">
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" class="print_next_item btn btn-primary">下一步</button>
			</div>
		</div>
	</div>
</div>

<%--打印框 开始--%>
<div class="print_preview_wrapper modal fade" tabindex="-1" role="dialog" aria-labelledby="printFinsh" aria-hidden="true">
	<div class="passport_certidetail_wrapper modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
				<h4 class="modal-title" id="printFinsh"></h4>
			</div>
			<div class="modal-body">
				<!--startprint1-->
				<div class='print_product_container'>
					<div class='print_product_wrapper' >
						<p>实际打印视图</p>
						<!--start printsetting-->
						<div class='print_page_wrapper'>
							<div class="my_show" id='dyobj'>
								<p>
									<span class="name span1"></span>
									<span class="passportNO span1"></span>
									<span class="qrcode" style="position:absolute;top:0;right:0;"></span>
								</p>
								<p>
									<span class="sex span1"></span>
									<span class="span3">中国</span>
									<span class="birthday"></span>
								</p>
								<p>
									<span class="signAddress span2">上海</span>
									<span class="signDate"></span>
								</p>
								<p>
									<span class="signUnti"></span>
								</p>
							</div>
						</div>
					</div>
				</div>
				<div class='print_settings_wrapper'>
					<a class='print_settingsbtn_item btn btn-default'>打印设置</a>
					<div class="maincontent">
						<ul>
							<li>
								<p>左边距</p>
								<div class='print_leftpadding_wrapper ybcommon_counter_item'>
									<a href="javascript:;">-</a>
									<input type='text' value='0'>
									<a href="javascript:;">+</a>
								</div>
							</li>
							<li>
								<p>上边距</p>
								<div class='print_toppadding_wrapper ybcommon_counter_item'>
									<a href="javascript:;">-</a>
									<input type='text' value='0'>
									<a href="javascript:;">+</a>
								</div>
							</li>
						</ul>
					</div>
				</div>
				<!--endprint1-->
			</div>
			<input type="hidden" id="_ID" value="">
			<input type="hidden" id="_STATUS" value="">
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<button type="button" class="print_printbtn_item btn btn-primary" >打印</button>
			</div>
		</div>
	</div>
</div>
<%--打印框 结束--%>

<div class="print_confirm_wrapper modal fade" tabindex="-2" role="dialog" aria-labelledby="myModalLabel3" aria-hidden="true">
	<div class="passport_certidetail_wrapper modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h4 class="modal-title" id="myModalLabel3"></h4>
			</div>
			<div class="modal-body">
				<p class='text-center'>是否已成功打印？</p>
			</div>
			<div class="modal-footer">
				<button class="print_faildbtn_item btn btn-default" type="button">否</button>
				<button class="print_successbtn_item btn btn-primary" type="button" data-dismiss="modal">是</button>
			</div>
		</div>
	</div>
</div>

<div class="print_pullback_wrapper modal fade" tabindex="-2" role="dialog" aria-labelledby="myModalLabel3" aria-hidden="true">
	<div class="passport_certidetail_wrapper modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h4 class="modal-title" id="myModalLabel3"></h4>
			</div>
			<div class="modal-body">
				<p class='text-center'>是否撤回？</p>
			</div>
			<div class="modal-footer">
				<button class="btn btn-default" type="button" data-dismiss="modal">否</button>
				<button class="print_pullbackbtn_item btn btn-primary" type="button" data-dismiss="modal">是</button>
			</div>
		</div>
	</div>
</div>

<c:forEach items="${data.content}" var="item" varStatus="status">
	<div class="modal fade" id="myModal_${item.id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel_txt_${item.id}" aria-hidden="true">
		<div class="passport_certidetail_wrapper modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
					<h4 class="modal-title" id="myModalLabel_txt_${item.id}">护照详情</h4>
				</div>
				<div class="modal-body">
					<dl class="dl-horizontal lead ">
						<dt>护照编号</dt>
						<dd>${item.passportNO}</dd>
						<dt>姓名</dt>
						<dd>${item.name}</dd>
						<dt>性别</dt>
						<dd>${item.sex}</dd>
						<dt>证件类型</dt>
						<dd>身份证</dd>
						<dt>证件编号</dt>
						<dd>${item.cardNO}</dd>
						<dt>出生日期</dt>
						<dd>${item.birthday}</dd>
					</dl>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal" itemId="${item.id}">重新制证</button>
					<button type="button" class=" btn btn-primary" itemId="${item.id}" status="20" >复核完成</button>
				</div>
			</div>
		</div>
	</div>
</c:forEach>
<div class="ctxctx">
	<input type="text" hidden/ value='${ctx}'>
</div>
</body>
<script>
	$(function(){//待制证
		$("[href='#asideCollapse4']").click();//展开公益护照管理
		$("#asideCollapse4 li:eq(0) a").css({"background-color":"#30c9a0","color":"#fff"});
		$("#asideCollapse4 li:eq(0) a").mouseover(function(){
			$(this).css({"background-color":"#30c9a0"})
		});
	})
</script>
</html>
